#{extends 'main.html' /}
#{set title:'Register' /}

<div id="content" class="about-me">
  <h3>Update Profile</h3>
  <form action="" method="POST" enctype="multipart/form-data">

  <ul class="long_login">
    #{if user.photo.exists()}
    <img src="@{Application.showUserPhoto()}" alt="{user.fullname}" />
    #{/if}
    #{else}
    <img src="@{'/public/images/lbi02.png'}" alt="Default User Photo" />
    #{/else}

    <li>
      <label>Full Name</label>
      <input type="text" name="user.fullname" value="${user.fullname}" />
      <span class="error">#{error 'user.fullname' /}</span>
    </li>
    <li>
      <label>Email</label>
      <input type="text" name="user.email" value="${user.email}" />
      <span class="error">#{error 'user.email' /}</span>
    </li>
    <li>
      <label>Password</label>
      <input type="password" name="user.password" value="${user.password}"/>
      <span class="error">#{error 'user.password' /}</span>
    </li>
    <li>
      <label>Address</label>
      <input type="text" name="user.address" value="${user.address}" />
      <span class="error">#{error 'user.address' /}</span>
    </li>
    <li>
      <label>Photo</label>
      <input type="file" name="user.photo" />
    </li>
  <input type="submit" class="login_button" name="submit" value="Update" />
  </ul>
  </form>
</div>
